package com.ubeecube.mylocker.ui;

import java.util.ArrayList;

import com.ubeecube.mylocker.R;
import com.ubeecube.mylocker.viewobjects.Folder;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.AdapterView.OnItemClickListener;

public class LockerPhotos extends Activity implements OnItemClickListener{

	private ListView photoListView;
	private ArrayList<Folder> folderList;
	private LockerPhotosAdaptor photosAdaptor;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);

		setContentView(R.layout.locker_photos);

		photoListView = (ListView) findViewById(R.id.photo_listview);
		initFolderList();
		photosAdaptor = new LockerPhotosAdaptor(this, folderList);

		photoListView.setAdapter(photosAdaptor);
		photoListView.setOnItemClickListener(this);
	}

	private void initFolderList() {
		Folder folder = new Folder();
		folder.setID("Personal_timestamp");
		folder.setName("Personal");
		folderList = new ArrayList<Folder>();
		folderList.add(folder);
	}

	@Override
	public void onItemClick(AdapterView<?> arg0, View view, int position, long arg3) {
		Intent intent = new Intent(this, LockerGallery.class);
		startActivity(intent);
	}

}
